package com.xmy.cultivate.service.message;

import com.xmy.cultivate.event.listener.ClickListener;
import com.xmy.cultivate.event.listener.MessageSource;
import com.xmy.cultivate.event.listener.SubscribeListener;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class EventMessageService implements IMessage {
    @Override
    public String handler(Map<String, Object> param) {
        MessageSource source = new MessageSource();
        //其他事件进行add处理即可
        //System.out.println("添加到监听类");
        source.addListener(new ClickListener());
        source.addListener(new SubscribeListener());
        return source.setParam(param);
    }
}
